//index.js
//先导入 再引入
const {getMvHttp} = require("../../module/http")
Page({
  data:{
    playlists:[]
  },
  onLoad:async function(){
     var res = await getMvHttp();
    //  console.log(res.data.data);
     var playlists =[];
     res.data.data.forEach(item=>{
    //    console.log(item);
       let {name,cover,id,playCount} = item;
       playlists.push({
         name,
         playCount,
         coverImgUrl:cover,
          id,
       })
     })
     this.setData({
       playlists
     })
  }
})
